
<!DOCTYPE html>
<html class="no-js css-menubar" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="description" content="bootstrap admin template">
    <meta name="author" content="">

    <title>微米荟商城管理系统</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />

    <!-- Stylesheets -->
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.css">
    <link rel="stylesheet" href="https://static.9hive.cn/global/css/bootstrap-extend.min.css?v2.2.2">
    <link rel="stylesheet" href="https://static.9hive.cn/mmenu/assets/css/site.min.css?v2.2.0">

    <!-- Plugins -->
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/animsition/animsition.min.css?v2.2.0">
    <!-- Page -->
    <link rel="stylesheet" href="https://static.9hive.cn/mmenu/assets/examples/css/pages/login-v2.min.css?v2.2.0">

    <!-- Fonts -->
    <link rel="stylesheet" href="https://static.9hive.cn/global/fonts/web-icons/web-icons.min.css?v2.2.1">
    <link rel="stylesheet" href="https://nsr.9hive.cn/hive/assets/admin/admin2.css">
    <!--[if lt IE 9]>
    <script src="https://static.9hive.cn/global/vendor/html5shiv/html5shiv.min.js"></script>
    <![endif]-->

    <!--[if lt IE 10]>
    <script src="https://static.9hive.cn/global/vendor/media-match/media.match.min.js"></script>
    <script src="https://static.9hive.cn/global/vendor/respond/respond.min.js"></script>
    <![endif]-->

    <!-- Scripts -->
    <!--   <script src="https://static.9hive.cn/hive/assets/admin/login.js"></script>
   -->

    <style>
        .form-control {
            height: 38px;
        }
.hive-form-group{
    width: 70%;
}

    </style>
</head>
<body class="page-login-v2 layout-full page-dark">
<!-- Page -->
<div class="page animsition" data-animsition-in="fade-in" data-animsition-out="fade-out">
    <div class="page-content2">
        <div class="page-brand-info">
            <div class="brand">
                <img class="brand-img" src="${adminLogo!'https://static.9hive.cn/hive/assets/images/joy.png'}" alt="..." style="max-width: 35px">
                <%if(isNotEmpty(chineseName)){%>
                <h2 class="brand-text font-size-20">${chineseName!}</h2>
                <%}else{%>
                <h2 class="brand-text font-size-20">微米荟商城</h2>
                <%}%>
            </div>

            <div class="brand">
                <a class="brand-a">官网首页</a>
                <!--<a class="brand-a">登录</a>-->
                <a href="/login/register" >注册</a>
            </div>
            <!--            <p class="font-size-20">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua.</p>-->
        </div>

        <div class="hive-login-main" style="padding-top: 40px;width: 410px;height: 365px">

                <div class="color_wel font-size-24 font-weight-500" ><%if(isNotEmpty(chineseName)){%>${systemName!}<%}else{%>欢迎登录<%}%></div>
                <div class="hive-form-group" style="margin-top: 20px">
                    <label class="sr-only" for="username">登录名</label>
                    <input type="" class="form-control login_color" id="username" name="username"
                           placeholder="用户名、手机号、邮箱">
                </div>
                <div class="hive-form-group">
                    <label class="sr-only" for="inputPassword">密码</label>
                    <input type="password" class="form-control" id="inputPassword" name="password"
                           placeholder="密码">
                </div>
                <div class="hive-form-group">
                    <div class="checkbox-custom checkbox-inline checkbox-primary pull-left">
                        <input type="checkbox" id="remember" name="checkbox">
                        <label for="remember" class="font-weight-400">记住账号</label>
                    </div>
                    <a class="pull-right form-color_a font-weight-400" href="/login/register">还没有注册?</a>
                </div>
                <button type="submit" class="hive-btn" id="login">登录</button>

        </div>
    </div>
    <footer>Copyright All Rights Reserved © 2017</footer>

</div>
<!-- End Page -->


<!-- Core  -->
<script src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/animsition/animsition.min.js"></script>
<!-- Scripts -->
<script src="https://static.9hive.cn/global/js/core.min.js"></script>
<script src="https://static.9hive.cn/mmenu/assets/js/site.min.js"></script>

<script src="https://static.9hive.cn/global/js/configs/config-colors.min.js"></script>
<script src="https://static.9hive.cn/global/js/components/animsition.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>

<script type="text/javascript" src="/res/js/jquery.cookie.js"></script>
<script>
    (function (document, window, $) {
        'use strict';

        var Site = window.Site;
        $(document).ready(function () {
            Site.run();
        });
    })(document, window, jQuery);
</script>

<script type="text/javascript">
    $(function () {
        window.document.onkeypress = SubmitOrHidden;//当有键按下时执行函数

        //查看用户名是否记住密码
        var remember=$.cookie("remember");
        if(remember){
            $("#username").val($.cookie("_username"));
            $("#remember").attr("checked",true);
        }


    });

    //这个就是键盘触发的函数
    var SubmitOrHidden = function (evt) {
        evt = window.event || evt;
        if (evt.keyCode == 13) {//如果取到的键值是回车
            login();
        } else {
            //其他键  dosomething
        }
    };

    $("#login").click(function () {
        login();
    });
    function login() {
        var remember=$('#remember').is(':checked')
        var username = $("input[name='username']").val();
        var password = $("input[name='password']").val();
        $.ajax({
            url: "${base}/login/singIn",
            type: "POST",
            data: {
                username: username,
                password: password,
                remember:remember
            },
            success: function (data) {
                if (data.code == 0) {
                    if(remember){
                        $.cookie('_username', username, { expires: 365 });//存入cookie,有效期365天
                        $.cookie('remember', remember, { expires: 365 });//存入cookie,有效期365天
                    }

                    window.location.href = "/memberCenter/indexv3";
                } else {
                    layer.msg(data.desc);
                    return false;
                }
            }
        })
    }
</script>
<!-- Google Analytics -->
<script>
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '',
        'ga');

    ga('create', 'UA-65522665-1', 'auto');
    ga('send', 'pageview');
</script>
</body>

</html>